package ch.fusun.baron.player;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.player.api.PlayerService;

/**
 * Updates player information
 */
public class UpdatePlayerUpdateData implements DataUpdate {

	@Inject
	private transient PlayerService playerService;
	private Player person;

	/**
	 * Kryo
	 */
	public UpdatePlayerUpdateData() {
	}

	/**
	 * @param person
	 *            The person to be updated
	 */
	public UpdatePlayerUpdateData(Player person) {
		this.person = person;
	}

	@Override
	public void update() {
		playerService.updatePlayer(person);
	}

}
